﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class SucursalesFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As SucursalesBE
        Dim tmpSucursales As SucursalesBE = New SucursalesBE()
        Try
            With tmpSucursales
                .Calle = convertDTFromDb.ConvertString(dr.Item("Calle"))
                .Ciudad = convertDTFromDb.ConvertString(dr.Item("Ciudad"))
                .Colonia = convertDTFromDb.ConvertString(dr.Item("Colonia"))
                .CP = convertDTFromDb.ConvertString(dr.Item("CP"))
                .Estado = convertDTFromDb.ConvertString(dr.Item("Estado"))
                .IdEmpresa = convertDTFromDb.convertInt32(dr.Item("IdEmpresa"))
                .IdSuc = convertDTFromDb.convertInt32(dr.Item("IdSuc"))
                .NombreSuc = convertDTFromDb.ConvertString(dr.Item("NombreSuc"))
                .NumExt = convertDTFromDb.ConvertString(dr.Item("NumExt"))
                .NumInt = convertDTFromDb.ConvertString(dr.Item("NumInt"))
                .Pais = convertDTFromDb.ConvertString(dr.Item("Pais"))
            End With
            Return tmpSucursales
        Catch ex As Exception
            Throw
        Finally
            tmpSucursales = Nothing
        End Try
    End Function
End Class
